home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Business Master (4th Edition)
/
The Business Master - 4th Edition.iso
/
files
/
texttors
/
raved
/
reprof.mac
< prev
Wrap
Text File
|
1991-08-30
|
6KB
|
136 lines
Ravitz Editor - useful patches and macros
autoscroll cursor with command recall cursor up, down and disable alt-y
rotating permanent panels
record and playback keystrokes
move marked area
box the perimeter of the area mark
delete blank lines in the area mark
load multiple files on startup
tab functions that insert or delete spaces in insert mode
* autoscroll cursor with command recall cursor up, down and disable alt-y ******
* This setup sets autoscroll cursor movement for the text area. For the
* command line the up and down cursor keys recall commands foward and
* backward. Alt-y is disabled. Use esc to switch the cursor area.
W @a-y &noop
W @csrlf &csrlf
W @csrrt &csrrt
W @csrup ¯o(10)
W @csrdn ¯o(11)
X 10 ^ifcsrcmdln ^recallcmdfor ^ifcsrtxt ^csrup
X 11 ^ifcsrcmdln ^recallcmdbk ^ifcsrtxt ^csrdn
* rotating permanent panels ****************************************************
* This macro rotates between a number of permanent panels and compensates for
* any size panel. Two numbers need to be set as noted in the comments.
x *
y ^inhibitscrn ^savecsrps ^csrcmdln
y ^varset(1) ^bytepatch @permpanel
y ^varadd(1) 1
y ^if<> ^var(1) 9 ^jumpfor(3) ^varset(1) 0 // * 9 is last panel + 1
y ^if<> ^var(1) 1 ^jumpfor(3) ^varset(1) 3 // * 3 is first panel
y ^varset(0) ^scrnsplit ^if<>0 ^var(0) ^unsplitscrn
y ^patchbyte @permpanel ^var(1) ^updatescrninh
y ^if=0 ^var(0) ^jumpfor(4) ^varadd(0) ^splitscrn(2) ^execfcn
y ^rescsrps ^updatescrn
* record and playback keystrokes ***********************************************
* These macros lets you record up to 40 keystrokes and play them back by
* pressing Ctrl-P. Ctrl-R starts and ends the recording. Shift mode r is
* displayed during recording. If a keystroke invokes a function that gets more
* keystrokes, then these are not recorded - you can record a key that displays
* a menu, but the menu selection is not recorded. If one of the keystrokes
* invokes a macro that turns the display off and assumes it will be turned on
* when the macro is finished, it will not be turned on when the macro is
* called from a macro. This may give unexpected results.
m 46 ^error Keystroke limit exceeded
w @c-r ¯o(1)
w @c-p ¯o(2)
x 1
y ^varset(1) ^@mac 2 ^varset(2) ^var(1) ^varadd(2) 80 ^setshiftmd(18)
y ^label(1)
y ^if< ^var(1) ^var(2) ^jumpfor(3) ^setshiftmd(0) &dispmsg(46)
y ^getkeyns
y ^if<> ^var(0) ^macro(*) ^jumpfor(3) ^setshiftmd(0) ^endmacro
y ^patchwords(2) ^var(1) ^var(0) ^endmacro ^varadd(1) 2
y ^execfcn
y ^jumpbklb(1)
X 2
Y ^noop ^noop ^noop ^noop ^noop ^noop ^noop ^noop ^noop ^noop
Y ^noop ^noop ^noop ^noop ^noop ^noop ^noop ^noop ^noop ^noop
Y ^noop ^noop ^noop ^noop ^noop ^noop ^noop ^noop ^noop ^noop
Y ^noop ^noop ^noop ^noop ^noop ^noop ^noop ^noop ^noop ^noop
* move marked area *************************************************************
* This macro moves the area mark with its contents to the cursor location. The
* cursor may be anywhere except the command line. The are you sure prompt for
* data lost past column 255 is not given. Ignore excluded lines mode is
* respected. The area mark is buffered in a temporary file, so more space is
* needed than for a normal overlay.
x *
y ^savecsrps
y ^if= ^armkmd ^sp &dispmsg(12) ^ifcsrcmdln &dispmsg(16)
y ^ifnoteditable &dispmsg(16)
y ^inhibitscrn
y ^varset(15) ^bytepatch @edcurfl ^patchbyte @edcurfl ^no
y ^csrcmdln ^eraseendln e ^execcmdnorecall
y ^patchbyte @edcurfl ^var(15)
y ^ifnotsuccess ^jumpforlb(2)
y ^csrtxt ^resexmd ^overlayar ^ifnotsuccess ^jumpforlb(1)
y ^resexmd ^blankarnsc ^movearmk
y ^prevses ^csrtxt ^suppressays &overlayar ^movearmk
y ^nextses ^csrcmdln q ^suppressays ^execcmdnorecall ^endmacro
y ^label(1) ^csrcmdln q ^suppressays ^execcmdnorecall ^csrtxt &dispmsg(5)
y ^label(2) ^eraseendln ^csrtxt &dispmsg(5)
* box the perimeter of the area mark *******************************************
x *
y ^if= ^armkmd ^sp &dispmsg(12) ^if<> ^armknotonscrn 0 &dispmsg(18) ^gotoarmk
y ^setdrawingmdsl ^if= ^curcol ^armkcol2 ^jumpfor(4) ^keyfcn @csrrt ^jumpbk(6)
y ^keyfcn @csrdn ^if<> ^inarmk 0 ^jumpbk(5) ^setdrawingmdoff ^csrup
y ^setdrawingmdsl ^if= ^curcol ^armkcol1 ^jumpfor(4) ^keyfcn @csrlf ^jumpbk(6)
y ^keyfcn @csrup ^if<> ^inarmk 0 ^jumpbk(5) ^setdrawingmdoff ^csrdn
y ^if= ^curcol ^armkcol2 ^endmacro // * this is for one column wide marks
y ^setdrawingmdsl ^keyfcn @csrrt ^setdrawingmdoff ^csrlf(1) ^csrcmdln ^csrtxt
* delete blank lines in the area mark ******************************************
x *
y ^if= ^armkmd ^sp &dispmsg(12) ^if<> ^armknotonscrn 0 &dispmsg(18) ^gotoarmk
y ^label(1)
y ^if<> ^currow ^scrnheight ^jumpfor(2) ^scrolldn1pg
y ^if=0 ^inarmk ^endmacro
y ^iflnexcluded ^reshow
y ^iflnnotblank ^jumpfor(3)
y ^delln ^jumpbklb(1) ^csrdn ^jumpbklb(1)
* load multiple files on startup ***********************************************
* This is a startup macro that loads multiple files into RE from the command
* line. It is not perfect, but should work in most cases.
m 46 ^error Files not loaded
x 0
y ^if<> ^msgnum 29 ^endmacro ^csrlf ^inhibitscrn
y ^csrtxt ^overlaycmd ^delchar(2) ^mkln ^flowlist ^topoffile ^varset(0) 0
y ^label(1)
y ^iflntopbot ^jumpforlb(2)
y ^setpsmk ^wordcmdln ^csrcmdln ^insmd e ^sp ^updatescrn ^inhibitscrn
y ^gotopsmk ^prevses ^execcmd
y ^ifsuccess ^jumpfor(6) ^gotopsmk ^csrdn ^varset(0) 1 ^jumpbklb(1)
y ^gotopsmk ^gotopsmk ^delln ^jumpbklb(1)
y ^label(2)
y ^unsetpsmk ^csrcmdln ^blankln ^csrstartln ^clrchgd
y ^if= ^var(0) 1 ^jumpfor(5) q ^execcmdnorecall ^nextses ^endmacro
y ^dispmsg(46)
* tab functions that insert or delete spaces in insert mode ********************
* tab function
x *
y ^ifinsmd ^jumpfor(3) ^tabcurset ^endmacro
y ^varset(1) ^curcol ^tabcurset ^varset(2) ^curcol ^csrcolx ^var(1)
y ^sp ^if< ^curcol ^var(2) ^jumpbk(4)
* back tab function
x *
y ^ifinsmd ^jumpfor(3) ^tabbkcurset ^endmacro
y ^varset(1) ^curcol ^tabbkcurset ^varset(2) ^curcol ^csrcolx ^var(1)
y ^bksp ^if> ^curcol ^var(2) ^jumpbk(4)